|
class ConstructionLine |
|
Parent: Drawingelement |
|
|
Methods:direction, direction=, end, end=, position, position=, reverse!, start, start=, stipple, stipple= |
|
|
Sample Code: |
|
|
Instance Methods |
|
direction |
|
The direction method retrieves a 3d vector in the direction of the construction line. |
|
Syntax: |
|
vector = constructionline.direction |
|
Arguments: |
|
|
|
Return Value: |
|
vector - a Vector3d object if successful |
|
Comments: |
|
|
|
Example: |
|
model = Sketchup.active_model |
|
direction= |
|
The direction= method is used to set the direction of the construction line to a 3d vector. |
|
Syntax: |
|
vector = constructionline.direction = vector |
|
Arguments: |
|
vector - the Vector3d whose direction will be used to set the direction of the construction line |
|
Return Value: |
|
vector - the new Vector3d object if successful |
|
Comments: |
|
|
|
Example: |
|
model = Sketchup.active_model if (vector) if (vector) |
|
end |
|
The end method retrieves the end point of a construction line in the form of a 3d point. |
|
Syntax: |
|
point = constructionline.end |
|
Arguments: |
|
|
|
Return Value: |
|
point - a Point3d object representing the end of the construction line |
|
Comments: |
|
If the construction line is infinite at the end, this returns nil. |
|
Example: |
|
model = Sketchup.active_model |
|
end= |
|
The end= method is used to set the end point of the construction line. This method will make the length finite at the end. |
|
Syntax: |
|
status = line.end = point | nil |
|
Arguments: |
|
point - the Point3d object to set for the end point of the construction line nil - sets the end point to infinite |
|
Return Value: |
|
status - 3d point if or nil |
|
Comments: |
|
Set the end to nil to make the construction line infinite at the end. |
|
Example: |
|
model = Sketchup.active_model |
|
position |
|
The position method is used to retrieve a 3d point used to create a construction line on an infinite construction line. |
|
Syntax: |
|
point = line.position |
|
Arguments: |
|
|
|
Return Value: |
|
point - the Point3d object used to create the line (if successful) |
|
Comments: |
|
|
|
Example: |
|
model = Sketchup.active_model |
|
position= |
|
Thie postion= method is used to set a 3d point that the construction passes through |
|
Syntax: |
|
point = constructionline.position= point |
|
Arguments: |
|
point - the Point3d object for the construction line to pass through |
|
Return Value: |
|
point - the new Point3d object that the construction line will pass through (if successful) |
|
Comments: |
|
|
|
Example: |
|
model = Sketchup.active_model |
|
reverse! |
|
The reverse! method is used to reverse the direction of the construction line. |
|
Syntax: |
|
status = line.reverse! |
|
Arguments: |
|
|
|
Return Value: |
|
status - ? |
|
Comments: |
|
|
|
Example: |
|
model = Sketchup.active_model |
|
start |
|
The start method is used to retrieve the starting point of a construction line. |
|
Syntax: |
|
point = constructionline.start |
|
Arguments: |
|
|
|
Return Value: |
|
point - the Poin3d object representing the starting point of the construction line (if successful) |
|
Comments: |
|
If the construction line is infinite at the start, this returns nil. |
|
Example: |
|
model = Sketchup.active_model |
|
start= |
|
The start= method is used to set the start point of a construction line making the line's length finite at the start. |
|
Syntax: |
|
point = constructionline.start = pt | nil |
|
Arguments: |
|
point - the Point3d object to set for the end point of the construction line nil - sets the end point to infinite |
|
Return Value: |
|
point - a Point3d object if successful or nil |
|
Comments: |
|
Setting the start to nil will make the construction line infinite ate the start. |
|
Example: |
|
model = Sketchup.active_model |
|
stipple |
|
The stipple method is used to retrieve the stipple pattern used to display the construction line. |
|
Syntax: |
|
pattern = constructionline.stipple |
|
Arguments: |
|
|
|
Return Value: |
|
pattern - the stipple pattern being used |
|
Comments: |
|
|
|
Example: |
|
model = Sketchup.active_model # Default returns 0 |
|
stipple= |
|
The stipple= method is used to set the stipple pattern used to display the construction line. |
|
Syntax: |
|
pattern = constructionline.stipple = pattern |
|
Arguments: |
|
pattern - a new stipple pattern |
|
Return Value: |
|
pattern - the newly set stipple pattern |
|
Comments: |
|
The stipple pattern can be given as a string or as a number. Valid strings are: "." |
|
Example: |
|
model = Sketchup.active_model |